[title sub="Written by Jim Davidson, Sponsored by Arvixe hosting"]Composr Supplementary: Composr Custom Profile Fields (CPF)[/title]

[title="3"]What are CPFs and why would you use them?[/title]


[url="http://compo.sr/start.htm" target="_blank"]Composr[/url] CPF&#8217;s are a powerful way to collect member information, you can create extremely complex signup forms but for now we will concentrate on some simple additions by creating form fields that allow the user to enter simple text, select an option from a dropdown list and make a selection from radio buttons.



Lets imagine we are going to create a Composr forum for dog lovers, typical information we might want to collect could be,

[list]
[*]Location[/*]
[*]Dogs name[/*]
[*]Dogs breed[/*]
[*]Dogs age[/*]
[*]Dogs Gender[/*]
[/list]
Everything we do will be in

Admin zone/Tools/Members/Custom profile fields

[media width="150" description="Add a custom profile field" float="right"]data_custom/images/docs/sup_composr_custom_profile_fields_cpf/f4de0ce6ba1cefe7152660f0846786ce.png[/media]

We will edit an existing Custom profile field (Location) and create new ones for the dogs name, breed, age and gender. Existing CPFs can be edited or deleted and new fields added easily.

[title="3"]Location.[/title]


Click &ldquo;Edit Custom Profile Field.&rdquo; There are a number of default fields that we can use but for now just click the edit link for &ldquo;Location&rdquo;.

[media width="150" description="Edit the location field" float="right"]data_custom/images/docs/sup_composr_custom_profile_fields_cpf/f98fbc271a614649da99cb3c4a7b7500.png[/media]

[media width="150" description="The edit profile fields" float="right"]data_custom/images/docs/sup_composr_custom_profile_fields_cpf/99aa16c5e9966c7d45d552b4479e2f0d.png[/media]

We simply want to collect &ldquo;Location&rdquo; data so we can leave the &ldquo;Type&rdquo; as &ldquo;A brief line of text (no Comcode support)&rdquo; After all, a location is a simple line of text.

By far the best time to collect data is when the member joins your community so it's a good idea to check Show on the join form, its also most likely that you want to collect this information so go ahead and check the Required Field check box too.

[media width="150" description="Check for required field and show on the join form" float="right"]data_custom/images/docs/sup_composr_custom_profile_fields_cpf/9ccc7b2cc2d35921c9ee519afe5143c2.png[/media]

Scroll to the bottom of the page and click save.

[title="3"]Dogs Name.[/title]


In this instance, we need to Add a Custom Profile Field.

[media width="150" description="Add custom profile field" float="right"]data_custom/images/docs/sup_composr_custom_profile_fields_cpf/3873b15b479052840b7b95c8dd187805.png[/media]

Give your new CPF a name &#8211; &ldquo;Dogs Name&rdquo; &#8211; and a description &ldquo;What is the name of your dog?&rdquo;

[media width="150" description="Add name and description to CPF" float="right"]data_custom/images/docs/sup_composr_custom_profile_fields_cpf/f38e1ed8fe6b3981005af16c8cbcfa0f.png[/media]

Default value can be left blank.

Once again the type of information we want to collect is a simple string of text so the default type will suffice.

[media width="150" description="What type of information to collect" float="right"]data_custom/images/docs/sup_composr_custom_profile_fields_cpf/bb879ca888842e0524ddb4d9d71b0d2f.png[/media]

Make sure you check required field and show on the join form.

[media width="150" description="Set fields - required and show on join form" float="right"]data_custom/images/docs/sup_composr_custom_profile_fields_cpf/4fd84ed62555fe56f2f4c46c39d3c900.png[/media]

Scroll to the bottom of the form and click Add Custom Profile Field.

[title="3"]Dog Breed.[/title]


The information we want to collect here is of a slightly different type. We know the different breeds of dogs, so we can create a list for the member to select from and it&#8217;s really easy to do.

Click to Add a Custom Profile Field and give it a Name &#8211; &ldquo;Dog Breed &rdquo; &#8211; and a Description &#8211; &ldquo;What breed is your dog?&rdquo;

[media width="150" description="Add a new custom profile field" float="right"]data_custom/images/docs/sup_composr_custom_profile_fields_cpf/c53189e6acdd9def154333a00c24df64.png[/media]

From the &ldquo;Type&rdquo; dropdown list there are lots of options but we want to select &ldquo;A value chosen from a list.&rdquo;

[media width="150" description="Set as value choosen from a list" float="right"]data_custom/images/docs/sup_composr_custom_profile_fields_cpf/f4bf3fdd200ab88f49f6c7eaa93ced48.png[/media]

[title="3"]Create the list of choices.[/title]


The &ldquo;Default value&rdquo; field is where we create our list of choices. Each choice is separated by a pipe | character which is usually found on the backslash key on your keyboard simple hit shift and the pipe/backslash keys together.

[media width="150" description="Create a list of choices for your custom profile field" float="right"]data_custom/images/docs/sup_composr_custom_profile_fields_cpf/45ca431ff2b26a84c2d2b8a1c07626f5.png[/media]

Make sure you check the &ldquo;Required field&rdquo; and &ldquo;Show on join form&rdquo; check boxes.

[media width="150" description="Required field and show on join form" float="right"]data_custom/images/docs/sup_composr_custom_profile_fields_cpf/3c30e89434fd1c8914242cec98fa17fe.png[/media]

Scroll to the bottom of the page and click “Add Custom Profile Field.”

[title="3"]Dogs age.[/title]


We want to collect the dogs age so go ahead and click &ldquo;Add Custom Profile Field.&rdquo;

Give it a Name &#8211; &ldquo;Dogs age&rdquo; and a description &#8211; &ldquo;How old is your dog?&rdquo;

The default value.

Like before, we want to create a list of options so enter the numbers 1-15 separated by a pipe.

1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15

For &ldquo;Type&rdquo; select &ldquo;A Value chosen from a list.&rdquo;

Make sure you check the &ldquo;Required field&rdquo; and &ldquo;Show on join form&rdquo; check boxes.

[media width="150" description="default values to your custom profile field" float="right"]data_custom/images/docs/sup_composr_custom_profile_fields_cpf/2f095dc08d39e9f1353ee849834f1c34.png[/media]

Scroll to the bottom of the page and click Add Custom Profile Field.

[title="3"]Gender[/title]


Finally we can create our Custom profile field for the gender of the dog.

Click &ldquo;Add a Custom Profile Field&rdquo;

Give it a &ldquo;Name&rdquo; &#8211; &ldquo;Dogs gender&rdquo; and a description &#8211; &ldquo;What sex is your dog?&rdquo;

There are only two options (Male/Female) ; so we could use a check box or radio buttons in our joining form so for &ldquo;Type&rdquo; select &ldquo;A value chosen from a set of radio buttons.&rdquo;

In the &ldquo;Default value&rdquo; type our two options Male | Female. Don&#8217;t forget to use the pipe separator.

Make sure you check the &ldquo;Required field&rdquo; and &ldquo;Show on join form&rdquo; check boxes.

[media width="150" description="Use radio buttons on your custom profile fields" float="right"]data_custom/images/docs/sup_composr_custom_profile_fields_cpf/3de49f568191c94aade219f1e412b844.png[/media]

Scroll to the bottom of the page and click Add Custom Profile Field.

As you can see from the screenshot, Composr allows you to quickly create complex forms that force users to enter information thus creating a stronger community.

[media width="150" description="View the finished signup form" float="right"]data_custom/images/docs/sup_composr_custom_profile_fields_cpf/39cb04d2b6a53fc054e5d8efa7410808.png[/media]

Additionally, you can stipulate who will see the member information.

[title="2"]Owner viewable[/title]

Whether a member may see their own value for this field.

[title="2"]Owner settable[/title]

Whether the target member may set the value of this field; if a field is required, then the member sets it during joining, irrespective of this.

[title="2"]Publicly viewable[/title]

Whether anyone may see the contents of this field.

[title="3"]Choose where to show the information.[/title]


[title="2"]Show with content[/title]

Whether the value of this field will be shown with member content (currently next to posts on the forum, and also from within personal-galleries).

[title="2"]Show with summaries of content[/title]

Whether the value of this field will be shown with certain kinds of member content summary (currently just personal-gallery links in the galleries module).

[title="2"]Usergroup[/title]

Only use this field for these member usergroups.

Finally you can set the order in which this field&#8217;s name and corresponding value are placed when an entry is viewed. The initial position is set by Composr, the default setting is sequential meaning that the value/s will be shown in the order you added them but you may want to change it.

Hopefully now you can see how quickly you can create sign up forms with check boxes, radio buttons dropdown lists using the intuitive [url="http://compo.sr/start.htm" target="_blank"]Composr[/url] interface?

[box="Thank you Arvixe"]This tutorial was sponsored by [url="Arvixe hosting"]http://www.arvixe.com[/url].[/box]

{$SET,tutorial_tags,Members,novice}{$SET,tutorial_add_date,Dec 2014}{$SET,tutorial_summary,What are CPFs and why would you use them? Composr CPF's are a powerful way to collect member information, you can create extremely complex signup forms but for now we …
}[block]main_tutorial_rating[/block]